package stu.day9_day18;

public class LeetCode125 {
    public boolean isPalindrome(String s) {

        StringBuilder sb =new StringBuilder();
        for(char ch:s.toCharArray()){
            if(Character.isLetterOrDigit(ch)){
                sb.append(Character.toLowerCase(ch));
            }
        }


        return sb.toString().equals(sb.reverse().toString());

    }
}
